
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for prtScheme.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="prtSchemeForm"
 */
public class PrtSchemeForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _schemeGuid = null;
   private java.lang.String _schemeTitle = null;
   private java.lang.String _schemeOwer = null;
   private java.lang.String _creater = null;
   private java.lang.String _remark1 = null;
   private java.lang.String _remark2 = null;
   private java.lang.String _remark3 = null;
   private java.lang.String _remark4 = null;

   /**
    * Standard constructor.
    */
   public PrtSchemeForm() {
   }

   /**
    * Returns the schemeGuid
    *
    * @return the schemeGuid
    */
   public java.lang.String getSchemeGuid() {
      return _schemeGuid;
   }

   /**
    * Sets the schemeGuid
    *
    * @param schemeGuid the new schemeGuid value
    */
   public void setSchemeGuid(java.lang.String schemeGuid) {
      _schemeGuid = schemeGuid;
   }
   /**
    * Returns the schemeTitle
    *
    * @return the schemeTitle
    */
   public java.lang.String getSchemeTitle() {
      return _schemeTitle;
   }

   /**
    * Sets the schemeTitle
    *
    * @param schemeTitle the new schemeTitle value
    */
   public void setSchemeTitle(java.lang.String schemeTitle) {
      _schemeTitle = schemeTitle;
   }
   /**
    * Returns the schemeOwer
    *
    * @return the schemeOwer
    */
   public java.lang.String getSchemeOwer() {
      return _schemeOwer;
   }

   /**
    * Sets the schemeOwer
    *
    * @param schemeOwer the new schemeOwer value
    */
   public void setSchemeOwer(java.lang.String schemeOwer) {
      _schemeOwer = schemeOwer;
   }
   /**
    * Returns the creater
    *
    * @return the creater
    */
   public java.lang.String getCreater() {
      return _creater;
   }

   /**
    * Sets the creater
    *
    * @param creater the new creater value
    */
   public void setCreater(java.lang.String creater) {
      _creater = creater;
   }
   /**
    * Returns the remark1
    *
    * @return the remark1
    */
   public java.lang.String getRemark1() {
      return _remark1;
   }

   /**
    * Sets the remark1
    *
    * @param remark1 the new remark1 value
    */
   public void setRemark1(java.lang.String remark1) {
      _remark1 = remark1;
   }
   /**
    * Returns the remark2
    *
    * @return the remark2
    */
   public java.lang.String getRemark2() {
      return _remark2;
   }

   /**
    * Sets the remark2
    *
    * @param remark2 the new remark2 value
    */
   public void setRemark2(java.lang.String remark2) {
      _remark2 = remark2;
   }
   /**
    * Returns the remark3
    *
    * @return the remark3
    */
   public java.lang.String getRemark3() {
      return _remark3;
   }

   /**
    * Sets the remark3
    *
    * @param remark3 the new remark3 value
    */
   public void setRemark3(java.lang.String remark3) {
      _remark3 = remark3;
   }
   /**
    * Returns the remark4
    *
    * @return the remark4
    */
   public java.lang.String getRemark4() {
      return _remark4;
   }

   /**
    * Sets the remark4
    *
    * @param remark4 the new remark4 value
    */
   public void setRemark4(java.lang.String remark4) {
      _remark4 = remark4;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getSchemeGuid() == null) {
         errors.add("schemeGuid", new ActionError("error.schemeGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
